/*
 * Version: 1.0.4
 * Build time: Fri Apr 07 2017 13:49:46 GMT+0800 (中国标准时间)
 * Copyright 2017, Alibaba
*/

/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};

/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {

/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId])
/******/ 			return installedModules[moduleId].exports;

/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			exports: {},
/******/ 			id: moduleId,
/******/ 			loaded: false
/******/ 		};

/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);

/******/ 		// Flag the module as loaded
/******/ 		module.loaded = true;

/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}


/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;

/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;

/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "";

/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {

	// webpack入口，用于打包标签引用的build文件，引入页面后会创建全局的Util对象。

	'use strict';

	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

	var _libMainJs = __webpack_require__(1);

	var _libMainJs2 = _interopRequireDefault(_libMainJs);

	if (!window.TVUtil) {
	  window.TVUtil = _libMainJs2['default'];
	}

/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {

	'use strict';

	Object.defineProperty(exports, '__esModule', {
	  value: true
	});

	var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

	var _cookie = __webpack_require__(2);

	var _cookie2 = _interopRequireDefault(_cookie);

	var _toast = __webpack_require__(3);

	var _toast2 = _interopRequireDefault(_toast);

	var _loading = __webpack_require__(4);

	var _loading2 = _interopRequireDefault(_loading);

	var _jsonp = __webpack_require__(7);

	var _jsonp2 = _interopRequireDefault(_jsonp);

	var _animate = __webpack_require__(5);

	var _animate2 = _interopRequireDefault(_animate);

	var _Highlight = __webpack_require__(8);

	var _Highlight2 = _interopRequireDefault(_Highlight);

	var _circleLoading = __webpack_require__(9);

	var _circleLoading2 = _interopRequireDefault(_circleLoading);

	var _Progress = __webpack_require__(10);

	var _Progress2 = _interopRequireDefault(_Progress);

	var _Dialog = __webpack_require__(11);

	var _Dialog2 = _interopRequireDefault(_Dialog);

	var _common = __webpack_require__(6);

	var _common2 = _interopRequireDefault(_common);

	var TVUtil = _extends({
	  Cookie: _cookie2['default'],
	  Toast: _toast2['default'],
	  Loading: _loading2['default'],
	  NewLoading: _circleLoading2['default'],
	  jsonp: _jsonp2['default'],
	  animate: _animate2['default'],
	  Highlight: _Highlight2['default'],
	  Progress: _Progress2['default'],
	  Dialog: _Dialog2['default']
	}, _common2['default']);

	exports['default'] = TVUtil;
	module.exports = exports['default'];

/***/ },
/* 2 */
/***/ function(module, exports) {

	'use strict';

	Object.defineProperty(exports, '__esModule', {
	  value: true
	});
	var Cookie = {

	  /**
	   * 设置cookie
	   * @instance
	   *
	   * @param cname  {String} cookie的名称
	   * @param cvalue {Stirng} cookie的值
	   * @param exdays {Number} cookie的有效时间，天为单位
	   */
	  set: function set(cname, cvalue, exdays) {
	    var d = new Date();
	    d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);
	    var expires = 'expires=' + d.toGMTString();
	    document.cookie = cname + '=' + escape(cvalue) + '; ' + expires;
	  },

	  /**
	   * 获取cookie
	   * @instance
	   *
	   * @param cname {String} cookie的名称
	   *
	   * @return {String} cookie的值
	   */
	  get: function get(cname) {
	    var name = cname + '';
	    var ca = document.cookie.split(';');
	    for (var i = 0; i < ca.length; i++) {
	      var c = ca[i].trim();
	      if (c.indexOf(name) == 0) {
	        return unescape(c.substring(name.length + 1, c.length));
	      }
	    }
	    return '';
	  }
	};

	exports['default'] = Cookie;
	module.exports = exports['default'];

/***/ },
/* 3 */
/***/ function(module, exports) {

	'use strict';

	Object.defineProperty(exports, '__esModule', {
	  value: true
	});
	var Toast = {
	  show: function show(tips, duration, styles) {
	    var self = this;
	    this.height = 200 / 192 * (document.documentElement.clientWidth / 10) + 'px';
	    this.paddingTop = 30 / 192 * (document.documentElement.clientWidth / 10) + 'px';
	    this.heightMore = -270 / 192 * (document.documentElement.clientWidth / 10) + 'px';
	    this.fontSize = 36 / 192 * (document.documentElement.clientWidth / 10) + 'px';

	    if (!duration) {
	      duration = 3000;
	    }

	    this.tipsDom = document.querySelector('.util-toast');

	    if (!this.tipsDom) {
	      this.tipsDom = document.createElement('div');
	      this.tipsDom.classList.add('util-toast');
	      this.tipsDom.style.zIndex = 99999;
	      this.tipsDom.style.position = 'fixed';
	      this.tipsDom.style.top = '0';
	      this.tipsDom.style.left = '0';
	      this.tipsDom.style.width = '101%';
	      this.tipsDom.style.paddingTop = this.paddingTop;
	      this.tipsDom.style.height = this.height;
	      this.tipsDom.style['font-size'] = this.fontSize;
	      this.tipsDom.style['text-align'] = 'center';
	      this.tipsDom.style.color = '#fff';
	      if (window.yunos) {
	        // Blitz内核linear-gradient的'特殊'写法
	        this.tipsDom.style.backgroundImage = 'linear-gradient(top, rgba(0,0,0,1), rgba(0,0,0,0.7) 50%, rgba(0,0,0,0))';
	      } else {
	        this.tipsDom.style.background = 'linear-gradient(rgba(0,0,0,1), rgba(0,0,0,0.7) 50%, rgba(0,0,0,0))';
	      }
	      this.tipsDom.style['background-size'] = '100% 100%';
	      this.tipsDom.style['-webkit-transition'] = '-webkit-transform .5s ease-out';
	      this.tipsDom.style['transition'] = 'transform .5s ease-out';
	      this.tipsDom.style['-webkit-transform'] = 'translate3d(0,' + this.heightMore + ',0)';
	      this.tipsDom.style['transform'] = 'translate3d(0,' + this.heightMore + ',0)';
	      document.querySelector('body').appendChild(this.tipsDom);
	    }
	    for (var key in styles) {
	      if (this.tipsDom.style[key] !== styles[key]) {
	        this.tipsDom.style[key] = styles[key];
	      }
	    }
	    this.tipsDom.innerHTML = tips;
	    this.timer && clearTimeout(this.timer);

	    setTimeout(function () {
	      // Blitz0时顶部会有一条白线，故设成-3
	      self.tipsDom.style['-webkit-transform'] = 'translate3d(0,-3px,0)';
	      self.tipsDom.style['transform'] = 'translate3d(0,-3px,0)';
	    }, 0);

	    this.timer = setTimeout(function () {
	      self.hide();
	    }, duration);
	  },

	  hide: function hide() {
	    this.tipsDom.style['-webkit-transform'] = 'translate3d(0,' + this.heightMore + ',0)';
	    this.tipsDom.style['transform'] = 'translate3d(0,' + this.heightMore + ',0)';
	    this.timer && clearTimeout(this.timer);
	  }
	};

	exports['default'] = Toast;
	module.exports = exports['default'];

/***/ },
/* 4 */
/***/ function(module, exports, __webpack_require__) {

	'use strict';

	Object.defineProperty(exports, '__esModule', {
	  value: true
	});

	var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

	function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

	function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }

	var _animateJs = __webpack_require__(5);

	var _animateJs2 = _interopRequireDefault(_animateJs);

	var _commonJs = __webpack_require__(6);

	var _commonJs2 = _interopRequireDefault(_commonJs);

	var Loading = (function () {
	  /**
	   * 创建一个Loading
	   * @param {Object} cfg - Loading配置项
	   * @param {string} [cfg.container] - 容器，Loading容器的父元素，默认：body
	   * @param {boolean} [cfg.visible] - 创建时是否直接显示，默认false
	   * @param {string} [cfg.text] - Loading组件的文案，默认：空
	   * @param {string} [cfg.textColor] - Loading组件文案的字体颜色，默认：#000000
	   * @param {string} [cfg.fontSize] - Loading组件文案的字体大小，以px为单位，是在1920分辨率下的大小，默认：36
	   * @param {string} [cfg.textMargin] - Loading组件文案距离上方小方块的距离，以px为单位，是在1920分辨率下的大小，默认：36
	   * @param {string} [cfg.bgColor] - 蒙层颜色，rgba格式或者#ffffff格式，默认：rgba(0, 0, 0, 0.5)
	   * @param {string} [cfg.blockSize] - 小方块的大小，以px为单位，是在1920分辨率下的大小，默认：54
	   * @param {string} [cfg.blockColor] - 小方块的颜色，默认：#ffffff
	   * @param {string} [cfg.duration] - 动画持续时长，以秒为单位，默认0.3
	   * @param {string} [cfg.delay] - 小方块间动画的间隔，以秒为单位，默认duration/1.5
	   * @param {string} [cfg.duration] - 动画持续时长，以秒为单位，默认0.3
	   */

	  function Loading(cfg) {
	    _classCallCheck(this, Loading);

	    if (!cfg) cfg = {};
	    this.container = cfg.container || document.body;
	    this.blockSize = this.convertPx(cfg.blockSize || 26);
	    this.duration = cfg.duration || 0.1;
	    this.delay = cfg.delay || this.duration / 1.5;
	    this.visible = cfg.visible || false;
	    this.text = cfg.text || '';
	    this.bgColor = cfg.bgColor || 'rgba(0, 0, 0, 0.5)';
	    this.textColor = cfg.textColor || '#000000';
	    this.fontSize = this.convertPx(cfg.fontSize || 18);
	    this.textMargin = this.convertPx(cfg.textMargin || 18);
	    this.blockColor = cfg.blockColor || '#ffffff';
	    this.steps = [{
	      style: 'left',
	      start: 0,
	      end: this.blockSize
	    }, {
	      style: 'top',
	      start: 0,
	      end: this.blockSize
	    }, {
	      style: 'left',
	      start: this.blockSize,
	      end: 0
	    }, {
	      style: 'top',
	      start: this.blockSize,
	      end: 0
	    }];
	    this.render();
	    if (this.visible) {
	      this._move();
	    }
	  }

	  Loading.prototype.convertPx = function convertPx(px1920) {
	    var pxNumber = parseFloat(px1920);
	    if (isNaN(pxNumber)) {
	      throw new Error('[Util Loading Error] ' + px1920 + '转换为数字失败！');
	    }
	    var clientWidth = document.documentElement.clientWidth;
	    return parseFloat(px1920) / 1920 * clientWidth;
	  };

	  Loading.prototype.render = function render() {
	    var _this = this;

	    var clientHeight = this.container.clientHeight;
	    this.outerElement = document.createElement('div');
	    var outerStyle = '\n      display: ' + (this.visible ? 'block' : 'none') + ';\n      position: absolute;\n      left: 0;\n      top: 0;\n      padding-top: ' + (clientHeight / 2 - this.blockSize) + 'px;\n      width: 100%;\n      height: 100%;\n      background: ' + this.bgColor + ';\n      z-index: 9999999;\n      box-sizing: border-box;\n    ';
	    this.outerElement.setAttribute('style', outerStyle);
	    var innerStyle = '\n      position: relative;\n      margin: 0 auto;\n      width: ' + this.blockSize * 2 + 'px;\n      height: ' + this.blockSize * 2 + 'px;\n    ';
	    this.innerElement = document.createElement('div');
	    this.innerElement.setAttribute('style', innerStyle);
	    var blockStyle = '\n      position: absolute;\n      width: ' + this.blockSize + 'px;\n      height: ' + this.blockSize + 'px;\n      background: ' + this.blockColor + ';\n    ';
	    this.blockElements = _commonJs2['default'].fillArrayWithNumbers(3).map(function (v, k) {
	      var temp = document.createElement('div');
	      temp.setAttribute('style', blockStyle);
	      temp.style.opacity = 1 - 0.3 * k;
	      _this.innerElement.appendChild(temp);
	      return temp;
	    });
	    this.blockObjs = this.blockElements.map(function (v, k) {
	      return {
	        element: v,
	        currentStep: 0,
	        index: k
	      };
	    });
	    var textStyle = '\n      margin-top: ' + this.textMargin + 'px;\n      font-size: ' + this.fontSize + 'px;\n      color: ' + this.textColor + ';\n      text-align: center;\n    ';
	    this.textElement = document.createElement('div');
	    this.textElement.setAttribute('style', textStyle);
	    this.textElement.innerHTML = this.text;
	    this.outerElement.appendChild(this.innerElement);
	    this.outerElement.appendChild(this.textElement);
	    if (getComputedStyle(this.container).position === 'static') {
	      this.container.style.position = 'relative';
	    }
	    this.container.appendChild(this.outerElement);
	  };

	  Loading.prototype._move = function _move() {
	    this.isMoving = true;
	    for (var i = 0; i < this.blockObjs.length; i++) {
	      this._moveBlock(this.blockObjs[i], this.delay * i);
	    }
	  };

	  Loading.prototype._moveBlock = function _moveBlock(blockObj, delay) {
	    var _this2 = this;

	    var endCb = function endCb() {
	      blockObj.currentStep = ++blockObj.currentStep % 4;
	      if (blockObj.index === _this2.blockObjs.length - 1) {
	        if (_this2.destroyed) {
	          _this2.isMoving = false;
	          return;
	        }
	        if (!_this2.visible) {
	          _this2.isMoving = false;
	          return;
	        }
	        _this2._move();
	      }
	    };
	    var step = this.steps[blockObj.currentStep];
	    (0, _animateJs2['default'])(_extends({}, step, {
	      dom: blockObj.element,
	      duration: this.duration,
	      delay: delay,
	      easing: 'linear',
	      cb: endCb
	    }));
	  };

	  Loading.prototype.show = function show() {
	    if (this.visible) {
	      return;
	    }
	    this.outerElement.style.display = 'block';
	    this.visible = true;
	    if (!this.isMoving) {
	      this._move();
	    }
	  };

	  Loading.prototype.hide = function hide() {
	    if (!this.visible) {
	      return;
	    }
	    this.outerElement.style.display = 'none';
	    this.visible = false;
	  };

	  Loading.prototype.setBgColor = function setBgColor(bgColor) {
	    this.outerElement.style.background = bgColor;
	    this.bgColor = bgColor;
	  };

	  Loading.prototype.setText = function setText(text) {
	    this.textElement.innerHTML = text;
	    this.text = text;
	  };

	  Loading.prototype.setTextColor = function setTextColor(color) {
	    this.textElement.style.color = color;
	    this.textColor = color;
	  };

	  Loading.prototype.setTextMargin = function setTextMargin(textMargin) {
	    this.textMargin = this.convertPx(textMargin);
	    this.textElement.style.marginTop = this.textMargin + 'px';
	  };

	  Loading.prototype.setFontSize = function setFontSize(fontSize) {
	    this.fontSize = this.convertPx(fontSize);
	    this.textElement.style.fontSize = this.fontSize + 'px';
	  };

	  Loading.prototype.setBlockColor = function setBlockColor(blockColor) {
	    var _this3 = this;

	    this.blockColor = blockColor;
	    this.blockElements.map(function (v, k) {
	      v.style.background = _this3.blockColor;
	    });
	  };

	  Loading.prototype.destroy = function destroy() {
	    this.outerElement.style.display = 'none';
	    this.destroyed = true;
	    this.container.removeChild(this.outerElement);
	  };

	  return Loading;
	})();

	exports['default'] = Loading;
	module.exports = exports['default'];

/***/ },
/* 5 */
/***/ function(module, exports) {

	'use strict';

	Object.defineProperty(exports, '__esModule', {
	  value: true
	});

	var _Easing;

	function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

	var Easing = (_Easing = {
	  linear: function linear(currentIteration, startValue, changeInValue, totalIterations) {
	    return changeInValue * currentIteration / totalIterations + startValue;
	  },
	  // easeInOutSine
	  ease: function ease(currentIteration, startValue, changeInValue, totalIterations) {
	    return changeInValue / 2 * (1 - Math.cos(Math.PI * currentIteration / totalIterations)) + startValue;
	  }
	}, _defineProperty(_Easing, 'ease-out', function easeOut(currentIteration, startValue, changeInValue, totalIterations) {
	  return changeInValue * Math.sin(currentIteration / totalIterations * (Math.PI / 2)) + startValue;
	}), _defineProperty(_Easing, 'ease-in', function easeIn(currentIteration, startValue, changeInValue, totalIterations) {
	  return changeInValue * (1 - Math.cos(currentIteration / totalIterations * (Math.PI / 2))) + startValue;
	}), _Easing);

	/**
	 * DOM动画函数，
	 * 暂仅支持以数字加单位为值的属性，如top、width等，不支持transform类似的属性。
	 * 暂仅支持一次缓动一个属性。
	 * @Param {Object} cfg 具体动画配置;
	 * @Param {HTMLElement} cfg.dom DOM对象；
	 * @Param {String} cfg.style style属性；
	 * @Param {Number} cfg.start 起始值；
	 * @Param {Number} cfg.end 结束值；
	 * @Param {String} [cfg.unit] 单位，默认px；
	 * @Param {Number} [cfg.duration] 执行动画需要的时间，以秒为单位，默认1；
	 * @Param {Number} [cfg.delay] 动画执行前的延迟时间，以秒为单位，默认0，也就是不延迟；
	 * @Param {String} [cfg.easing] 缓动函数，目前支持：'ease'（默认）、'ease-out'、'ease-in'、'linear'；
	 * @Param {Function} [cfg.cb] 动画结束后的回调函数；
	 */
	function animate(cfg) {
	  if (!(cfg && cfg.dom && cfg.style && cfg.start !== undefined && cfg.end !== undefined)) {
	    throw new Error('animate方法的cfg参数：dom、style、start、end必需！');
	  }
	  var dom = cfg.dom;
	  var style = cfg.style;
	  var start = cfg.start;
	  var end = cfg.end;
	  var duration = cfg.duration !== undefined ? cfg.duration * 1000 : 1000;
	  var delay = cfg.delay ? cfg.delay * 1000 : 0;
	  var easing = cfg.easing || 'ease';
	  var unit = cfg.unit || 'px';
	  var cb = cfg.cb || null;

	  // Blitz默认是一帧14ms
	  var AllFrames = Math.ceil(duration / 14);
	  var delayFrames = Math.ceil(delay / 14);
	  var minInterval = window.yunos ? 0 : 14;
	  var delayCount = 1;
	  var currentFrame = 1;
	  if (delay === 0) {
	    var curStyle = Easing[easing](currentFrame, start, end - start, AllFrames);
	    dom.style[style] = curStyle + unit;
	    currentFrame++;
	  }
	  var interval = setInterval(function () {
	    if (delayCount < delayFrames) {
	      delayCount++;
	      return;
	    }
	    if (currentFrame >= AllFrames) {
	      clearInterval(interval);
	      dom.style[style] = end + unit;
	      cb && cb();
	    } else {
	      var curStyle = Easing[easing](currentFrame, start, end - start, AllFrames);
	      dom.style[style] = curStyle + unit;
	      currentFrame++;
	    }
	  }, minInterval);
	}

	exports['default'] = animate;
	module.exports = exports['default'];
	// easeOutSine

	// easeInSine

/***/ },
/* 6 */
/***/ function(module, exports) {

	'use strict';

	Object.defineProperty(exports, '__esModule', {
	  value: true
	});
	function fillArrayWithNumbers(n) {
	  var arr = Array.apply(null, Array(n));
	  return arr.map(function (x, i) {
	    return i;
	  });
	}

	function log(msg) {
	  if (!isDebug()) {
	    return;
	  }
	  var logWrap = document.querySelector('.log-wrap');

	  if (!logWrap) {
	    var cs = document.createElement('div');
	    cs.classList.add('log-wrap');
	    cs.style.position = 'absolute';
	    cs.style.top = 0;
	    cs.style.left = 0;
	    cs.style.zIndex = 9999;
	    cs.style.fontSize = '30px';
	    cs.style['background-color'] = 'rgba(255,255,255,0.4)';
	    document.body.appendChild(cs);
	    logWrap = cs;
	  }

	  logWrap.innerHTML = logWrap.innerHTML + '<br/>' + msg;
	};

	function loadVisibleImage() {
	  var con = arguments.length <= 0 || arguments[0] === undefined ? document.body : arguments[0];
	  var selector = arguments.length <= 1 || arguments[1] === undefined ? '.util-lazyload' : arguments[1];

	  var conRect = con.getBoundingClientRect();
	  var conLeft = conRect.left;
	  var conTop = conRect.top;
	  var conRight = conRect.right;
	  var conBottom = conRect.bottom;
	  var lazyImages = con.querySelectorAll(selector);

	  var _loop = function (i) {
	    var tempImage = lazyImages[i];
	    var dataSrc = tempImage.getAttribute('data-src');
	    var rect = tempImage.getBoundingClientRect();
	    // 未加载过，而且在viewport之内，加载图片
	    if (tempImage.src !== dataSrc && !(rect.left <= conLeft && rect.right <= conLeft || rect.left >= conRight && rect.right >= conRight || rect.top >= conBottom && rect.bottom >= conBottom || rect.top <= conTop && rect.bottom <= conTop)) {
	      var hiddenImage = new Image();
	      hiddenImage.src = dataSrc;
	      hiddenImage.onload = function () {
	        tempImage.src = dataSrc;
	      };
	    }
	  };

	  for (var i = 0; i < lazyImages.length; i++) {
	    _loop(i);
	  }
	};

	function removeSpaces(str) {
	  return str.replace(/\s+/g, '');
	};

	// 避免未删除的Util.log在线上出现
	function isDebug() {
	  var onlineHosts = ['www.taobao.com', 'alimarket.taobao.com'];
	  if (onlineHosts.indexOf(location.host) !== -1 && location.search.indexOf('debug') === -1) {
	    return false;
	  }
	  return true;
	};

	exports['default'] = {
	  fillArrayWithNumbers: fillArrayWithNumbers,
	  log: log,
	  loadVisibleImage: loadVisibleImage,
	  removeSpaces: removeSpaces,
	  isDebug: isDebug
	};
	module.exports = exports['default'];

/***/ },
/* 7 */
/***/ function(module, exports) {

	/**
	 * @param url     {String}   接口地址
	 * @param data    {Object}   查询数据
	 * @param success {Function} 成功的回调
	 * @param error   {Function} 错误的回调
	 */
	'use strict';

	Object.defineProperty(exports, '__esModule', {
	  value: true
	});
	var jsonp = function jsonp(url, data, success, error) {

	  if (!error) {
	    error = success;
	    success = data;
	    data = {};
	  }

	  if (typeof data !== 'object') {
	    throw new Error('#jsonp.js: data should be object!');
	  }

	  var _head = document.getElementsByTagName('head')[0];
	  var callbackName = 'jsonp_callback_' + Math.round(100000 * Math.random());
	  var script = document.createElement('script');

	  var params = [];
	  for (var key in data) {
	    params.push(key + '=' + data[key]);
	  }
	  params = params.join('&');
	  url += (url.indexOf('?') >= 0 ? '&' : '?') + encodeURI(params);

	  script.src = url + (url.indexOf('?') >= 0 ? '&' : '?') + 'callback=' + callbackName;
	  script.onerror = function () {
	    delete window[callbackName];
	    _head.removeChild(script);
	    error();
	  };
	  // 防止返回200，但返回数据不支持jsonp的情况下，script标签堆积过多
	  script.onload = function (e) {
	    setTimeout(function () {
	      if (window[callbackName]) {
	        delete window[callbackName];
	        _head.removeChild(script);
	      }
	    }, 100);
	  };

	  window[callbackName] = function (data) {
	    delete window[callbackName];
	    _head.removeChild(script);
	    success(data);
	  };

	  _head.appendChild(script);
	};

	exports['default'] = jsonp;
	module.exports = exports['default'];

/***/ },
/* 8 */
/***/ function(module, exports) {

	'use strict';

	Object.defineProperty(exports, '__esModule', {
	  value: true
	});

	function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }

	var Highlight = (function () {
	  function Highlight(cfg) {
	    _classCallCheck(this, Highlight);

	    if (!window.$FocusEngineGlobalRoot) {
	      throw new Error('[Highlight] Hightlight 必须依赖于FocusEngine组件树存在。');
	    }
	    this.root = window.$FocusEngineGlobalRoot;
	    this.hlWidget = this.root.getWidgetById(cfg.widgetId) || this.root;
	    this.className = cfg.className ? cfg.className : 'highlight';
	    this.styles = cfg.styles ? cfg.styles : {};
	    this.duration = cfg.duration !== undefined ? cfg.duration : 0.2;
	    this.easing = cfg.easing ? cfg.easing : 'linear';

	    // 生成随机ID
	    var randomId = Math.random().toString().slice(2, 12);
	    var confirmed = false;
	    while (!confirmed) {
	      if (document.getElementById('highlight_' + randomId)) {
	        randomId = Math.random().toString().slice(2, 12);
	      } else {
	        confirmed = true;
	      }
	    }
	    this.id = 'highlight_' + randomId;
	    this._render();
	    this._bind();
	  }

	  Highlight.prototype._render = function _render() {
	    var div = document.createElement('div');
	    div.id = this.id;
	    div.classList.add(this.className);
	    div.style.position = 'absolute';
	    for (var pro in this.styles) {
	      div.style[pro] = this.styles[pro];
	    }
	    this.div = div;
	    div.style.position = 'absolute';
	    div.style.top = 0;
	    div.style.left = 0;
	    div.style.boxSizing = 'content-box';
	    document.body.appendChild(div);
	    if (this.hlWidget.focused) {
	      var focusedLeaf = this.root.getFocusedLeaf();
	      if (focusedLeaf) {
	        this.moveTo(focusedLeaf.getWidgetRect());
	      }
	    }
	    div.getBoundingClientRect();
	    this.div.style.webkitTransition = this.div.style.transition = 'all ' + this.duration + 's ' + this.easing;
	  };

	  Highlight.prototype._bind = function _bind() {
	    var _this = this;

	    this.root.on('focus', function (e) {
	      if (_this.hlWidget.focused) {
	        _this.moveTo(e.target.getFutureRect());
	      }
	    });
	  };

	  Highlight.prototype.moveTo = function moveTo(rect) {
	    this.div.style.left = rect.left - this.div.clientLeft + 'px';
	    this.div.style.top = rect.top - this.div.clientTop + 'px';
	    this.div.style.width = rect.width + 'px';
	    this.div.style.height = rect.height + 'px';
	  };

	  Highlight.prototype.show = function show() {
	    this.div.style.visibility = 'visible';
	  };

	  Highlight.prototype.hide = function hide() {
	    this.div.style.visibility = 'hidden';
	  };

	  Highlight.prototype.destroy = function destroy() {
	    document.body.removeChild(this.div);
	  };

	  return Highlight;
	})();

	exports['default'] = Highlight;
	module.exports = exports['default'];

/***/ },
/* 9 */
/***/ function(module, exports) {

	'use strict';

	Object.defineProperty(exports, '__esModule', {
	  value: true
	});

	function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }

	var TAG = "COMPONENT:NEWLOADING:: ";
	var BASE_WIDTH = 1920; // 作为参考的基准宽度
	var imgSrc = '';

	/**
	 * NewLoading cyclone 系统最新loading，圆环滚动动画
	 * @author 澜嵚 <zhenjiang.szj@alibaba-inc.com>
	 * @since 2016/10/07
	 * @class
	 */

	var NewLoading = (function () {

	  /**
	   * constructor 构造函数
	   * @memberOf NewLoading.prototype
	   * @param cfg {Object} 配置参数
	   *   @param container     {String}  loading元素容器  默认为body
	   *   @param showBlock     {Boolean} 加载动画是否需要显示 true|false  默认为true
	   *   @param showText      {Boolean} 加载文字是否需要显示 true|false  默认为true
	   *   @param loadingSize   {Number}  loading 图标的尺寸，长宽相等，默认180px（1080p分辨率下）
	   *   @param degStep       {Number}  每帧转动的角度, 默认为 8
	   *   @param defaultShow   {Boolean} 是否在创建时即显示loading，默认为 true
	   */

	  function NewLoading(cfg) {
	    _classCallCheck(this, NewLoading);

	    if (!cfg) cfg = {};
	    this.container = cfg.container ? cfg.container : document.body;
	    this.showBlock = cfg.showBlock ? cfg.showBlock : true;
	    this.showText = cfg.showText ? cfg.showText : true;
	    this.loadingSize = cfg.loadingSize ? cfg.loadingSize : 180;
	    this.degStep = cfg.degStep ? cfg.degStep : 8;
	    if (cfg.defaultShow != undefined && cfg.defaultShow != null) {
	      this.defaultShow = cfg.defaultShow;
	    } else {
	      this.defaultShow = true;
	    }

	    if (!this.showBlock && !this.showText) {
	      return;
	    }

	    this.running = false; // 是否在动
	    this.loadingContent = null;
	    this.init();
	  }

	  /**
	   * init 组件初始化方法
	   * @memberOf NewLoading.prototype
	   * @method init
	   */

	  NewLoading.prototype.init = function init() {
	    this.renderUI();
	    if (this.defaultShow) {
	      this.start();
	    }
	  };

	  /**
	   * renderUI 渲染 UI
	   * @memberOf NewLoading.prototype
	   * @method renderUI
	   */

	  NewLoading.prototype.renderUI = function renderUI() {
	    if (!this.showBlock && !this.showText) {
	      return;
	    }

	    var docW = this.container.clientWidth,

	    // styles
	    loadingContentStyle = 'width: 100%;\n                            height: 100%;\n                            display: none;\n                            background-color: rgba(0, 0, 0, 0.5);\n                            text-align: center;\n                            position: absolute; \n                            left: 0;\n                            top: 0;\n                            color: #fff;\n                            z-index: 99999',
	        blockContentStyle = 'width: ' + this.loadingSize * docW / BASE_WIDTH + 'px; \n                            height: ' + this.loadingSize * docW / BASE_WIDTH + 'px;\n                            margin: ' + -this.loadingSize * docW / (BASE_WIDTH * 2) + 'px auto;\n                            position: relative;\n                            top: 50%;\n                            font-size: ' + 54 * docW / BASE_WIDTH + 'px',
	        loadingTextStyle = 'font-size: ' + 24 * docW / BASE_WIDTH + 'px; \n                            position: relative;\n                            margin-top: ' + 24 * docW / BASE_WIDTH + 'px;\n                            width: ' + (this.loadingSize * docW / BASE_WIDTH + 100) + 'px; \n\n                            height: ' + 30 * docW / BASE_WIDTH + 'px;\n                            text-align:center;\n                            margin-left:-50px;',
	        message1WrapStyle = 'display: flex;\n                            justify-content: center;\n                            align-items: center;\n                            position: absolute;\n                            top: 0;\n                            left: 0;\n                            width: 100%;\n                            height: 100%;\n                            padding-left: ' + 15 * docW / BASE_WIDTH + 'px;',
	        imgStyle = 'width: 100%;\n                            height: 100%;',
	        percentIconStyle = 'width: ' + 30 * docW / BASE_WIDTH + 'px;\n                            height: ' + 30 * docW / BASE_WIDTH + 'px;\n                            font-size: ' + 24 * docW / BASE_WIDTH + 'px;\n                            visibility: hidden;\n                            padding-top: ' + 15 * docW / BASE_WIDTH + 'px;',
	        jMessage1Styel = 'height: ' + 60 * docW / BASE_WIDTH + 'px;\n                            line-height: ' + 60 * docW / BASE_WIDTH + 'px;',
	        html = '',
	        div = document.createElement("div");

	    if (this.showBlock) {
	      html += '<div class="circle-loading-block-content" style="' + blockContentStyle + '">\n                <div class="circle-loading-message1-wrap" style="' + message1WrapStyle + '">\n                  <div class="circle-loading-message1" style="' + jMessage1Styel + '"></div>\n                  <div class="circle-loading-percent-icon" style="' + percentIconStyle + '">%</div>\n                </div>\n                <img class="circle-loading-rotate-content" style="' + imgStyle + '" src="' + imgSrc + '">\n                ' + (this.showText ? '<div class="circle-loading-message2" style="' + loadingTextStyle + '"></div>' : '') + '\n              </div>';
	    }
	    div.setAttribute('style', loadingContentStyle);
	    div.innerHTML = html;
	    this.container.appendChild(div);

	    this.loadingContent = div;
	    this.docW = docW;
	  };

	  /**
	   * start 开始动画
	   * @memberOf NewLoading.prototype
	   * @method start
	   */

	  NewLoading.prototype.start = function start() {
	    this.loadingContent.style.display = 'block';
	    this.running = true;
	    var dom = this.loadingContent.querySelector('.circle-loading-rotate-content');
	    this.curDeg = 0;
	    function rotate(dom) {
	      this.curDeg += this.degStep;
	      if (this.curDeg >= 360) {
	        this.curDeg = 0;
	      }
	      dom.style.transform = 'rotate(' + this.curDeg + 'deg)';
	    }

	    this.timer = setInterval(rotate.bind(this, dom), 16);
	  };

	  /**
	   * stop 停止动画
	   * @memberOf NewLoading.prototype
	   * @method stop
	   */

	  NewLoading.prototype.stop = function stop() {
	    this.running = false;
	    var dom = this.loadingContent.querySelector('.circle-loading-rotate-content');
	    clearInterval(this.timer);
	    this.timer = null;
	    dom.style.transform = 'rotate(0deg)';
	  };

	  /**
	   * show 显示 loading
	   * @memberOf NewLoading.prototype
	   * @method show
	   */

	  NewLoading.prototype.show = function show() {
	    if (this.loadingContent) {
	      this.loadingContent.style.display = 'block';
	      if (this.running) {
	        this.stop();
	      }
	      this.start();
	    }
	  };

	  /**
	   * hide 隐藏 loading
	   * @memberOf NewLoading.prototype
	   * @method hide
	   */

	  NewLoading.prototype.hide = function hide() {
	    if (this.loadingContent) {
	      this.stop();
	      this.loadingContent.style.display = 'none';
	    }
	  };

	  /**
	   * setBg 设置 loading 背景颜色
	   * @memberOf NewLoading.prototype
	   * @method setBg
	   * @param color {String} css color 属性值
	   */

	  NewLoading.prototype.setBg = function setBg(color) {
	    if (this.loadingContent) {
	      this.loadingContent.style.backgroundColor = color;
	    }
	  };

	  /**
	   * remove 删除 loading
	   * @memberOf NewLoading.prototype
	   * @method remove
	   */

	  NewLoading.prototype.remove = function remove() {
	    if (this.loadingContent) {
	      this.stop();
	      this.container.removeChild(this.loadingContent);
	    }
	  };

	  /**
	   * setMessage1 设置消息内容1
	   * @memberOf NewLoading.prototype
	   * @method setMessage1
	   * @param msg {String} 消息内容
	   */

	  NewLoading.prototype.setMessage1 = function setMessage1(msg) {
	    if (msg.indexOf('%') != -1) {
	      this.loadingContent.querySelector('.circle-loading-percent-icon').style.visibility = 'visible';
	      msg = msg.replace('%', '');
	    } else {
	      this.loadingContent.querySelector('.circle-loading-percent-icon').style.visibility = 'hidden';
	    }
	    this.loadingContent.querySelector('.circle-loading-message1').textContent = msg;
	  };

	  /**
	   * setMessage2 设置消息内容2
	   * @memberOf NewLoading.prototype
	   * @method setMessage2
	   * @param msg {String} 消息内容
	   */

	  NewLoading.prototype.setMessage2 = function setMessage2(msg) {
	    this.loadingContent.querySelector('.circle-loading-message2').textContent = msg;
	  };

	  /**
	   * resize 重新设置loading尺寸，如果不传参数，将根据容器大小自适应缩放
	   * @memberOf NewLoading.prototype
	   * @method resize
	   * @param scale {Number} 缩放的倍数
	   */

	  NewLoading.prototype.resize = function resize(scale) {
	    var loadingBlockContent = this.loadingContent.querySelector('.circle-loading-block-content');
	    var scaleImpl = scale;
	    if (!scale) {
	      scaleImpl = this.container.clientWidth / this.docW;
	    }
	    loadingBlockContent.style.transform = 'scale(' + scaleImpl + ')';
	  };

	  /**
	   * getName 获取组件名称
	   * @memberOf NewLoading.prototype
	   * @method getName
	   * @return {String}
	   */

	  NewLoading.prototype.getName = function getName() {
	    return 'NewLoading';
	  };

	  return NewLoading;
	})();

	exports['default'] = NewLoading;
	module.exports = exports['default'];

/***/ },
/* 10 */
/***/ function(module, exports) {

	/**
	 * 纯js进度条
	 */

	'use strict';

	Object.defineProperty(exports, '__esModule', {
	    value: true
	});
	function Prgress(options) {

	    this.w = options && options.width ? parseFloat(options.width) : parseFloat(this.options.width);
	    this.h = options && options.height ? parseFloat(options.height) : parseFloat(this.options.height);
	    this.bgColor = options && options.bgColor ? options.bgColor : this.options.bgColor;
	    this.proColor = options && options.proColor ? options.proColor : this.options.proColor;
	    this.fontColor = options && options.fontColor ? options.fontColor : this.options.fontColor;
	    this.showPresent = options && options.showPresent != undefined ? options.showPresent : this.options.showPresent;
	    this.completeCallback = options && options.completeCallback ? options.completeCallback : this.options.completeCallback;
	    this.changeCallback = options && options.changeCallback ? options.changeCallback : this.options.changeCallback;
	    this.text = options && options.text ? options.text : this.options.text;
	    this.val = options && options.val ? options.val : this.options.val;

	    this.strTemp = this.text.substring(0, this.text.indexOf('#*')) + "{{pro}}" + this.text.substring(this.text.indexOf('*#') + 2);

	    this.init();
	}
	/**
	 * 默认选项
	 * @type {{width: number, height: number, bgColor: string, proColor: string, fontColor: string, val: number, text: string, showPresent: boolean, completeCallback: Function, changeCallback: Function}}
	 */
	Prgress.prototype.options = {

	    width: 200,
	    height: 30,
	    bgColor: "#005538",
	    proColor: "#009988",
	    fontColor: "#FFFFFF",
	    val: 10,
	    text: "当前进度为#*val*#%",
	    showPresent: true,
	    completeCallback: function completeCallback() {},
	    changeCallback: function changeCallback() {}

	};

	/**
	 * 初始化
	 */
	Prgress.prototype.init = function () {

	    this.proBox = document.createElement('div');
	    this.proBg = document.createElement('div');
	    this.proPre = document.createElement('div');
	    this.proFont = document.createElement('div');

	    addClass(this.proBox, 'proBox');
	    addClass(this.proBg, 'proBg');
	    addClass(this.proPre, 'proPre');
	    addClass(this.proFont, 'proFont');

	    this.proBox.setAttribute("style", "width:" + this.w + "px; height:" + this.h + "px; position:relative; overflow:hidden; box-shadow:0 0 5px #FFFFFF; -moz-box-shadow:0 0 5px #FFFFFF; -webkit-box-shadow:0 0 5px #FFFFFF; -o-box-shadow:0 0 5px #FFFFFF;");
	    this.proBg.setAttribute("style", "background-color:" + this.bgColor + "; position:absolute; z-index:1; width:100%; height:100%; top:0; left:0;");
	    this.proPre.setAttribute("style", "transition:all 300ms; -moz-transition:all 300ms; -webkit-transition:all 300ms; -o-transition:all 300ms; width:" + this.val + "%; height:100%; background-color:" + this.proColor + "; position:absolute; z-index:2; top:0; left:0;");
	    if (this.showPresent) {

	        this.proFont.setAttribute("style", "overflow:hidden;text-overflow:ellipsis; white-space:nowrap; *white-space:nowrap; width:100%; height:100%; color:" + this.fontColor + "; text-align:center; line-height:" + this.h + "px; z-index:3; position:absolute; font-size:12px;");

	        var text = this.parseText();
	        this.proFont.innerHTML = text;
	        this.proFont.setAttribute("title", text);
	        this.proBox.appendChild(this.proFont);
	    }

	    this.proBox.appendChild(this.proBg);
	    this.proBox.appendChild(this.proPre);
	};

	/**
	 *
	 */
	Prgress.prototype.refresh = function () {
	    this.proPre.style.width = this.val + "%";

	    this.proFont.innerHTML = this.parseText();
	};

	/**
	 * 转换文字
	 * @returns {options.text|*}
	 */
	Prgress.prototype.parseText = function () {
	    this.text = this.strTemp.replace("{{pro}}", this.val);
	    return this.text;
	};

	/**
	 * 更新进度条进度
	 * @param val
	 */
	Prgress.prototype.update = function (val) {

	    this.val = val;
	    this.refresh();

	    this.changeCallback.call(this, val);
	    if (val == 100) {
	        this.completeCallback.call(this, val);
	    }
	};
	/**
	 * 获取进度条本身的html对象，可直接将其塞入容器中
	 * @returns {HTMLElement|*}
	 */
	Prgress.prototype.getBody = function () {
	    return this.proBox;
	};
	/**
	 * 获取当前进度条的值
	 * @returns {*}
	 */
	Prgress.prototype.getVal = function () {
	    return this.val;
	};

	function hasClass(obj, cls) {
	    return obj.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)'));
	}

	function addClass(obj, cls) {
	    if (!hasClass(obj, cls)) obj.className += " " + cls;
	}

	function removeClass(obj, cls) {
	    if (hasClass(obj, cls)) {
	        var reg = new RegExp('(\\s|^)' + cls + '(\\s|$)');
	        obj.className = obj.className.replace(reg, ' ');
	    }
	}

	function toggleClass(obj, cls) {
	    if (hasClass(obj, cls)) {
	        removeClass(obj, cls);
	    } else {
	        addClass(obj, cls);
	    }
	}

	exports['default'] = Prgress;
	module.exports = exports['default'];

/***/ },
/* 11 */
/***/ function(module, exports) {

	/**
	 * Created by huanlai.whl on 2016/12/29.
	 * 符合fe焦点管理的dialog
	 */

	"use strict";

	Object.defineProperty(exports, "__esModule", {
	    value: true
	});
	function Dialog(options) {
	    //this.main = options ? options.main : undefined;
	    this.isDefalt = options & options.isDefalt ? options.isDefalt : true;
	    this.w = options && options.width ? parseFloat(options.width) : parseFloat(this.options.width);
	    this.h = options && options.height ? parseFloat(options.height) : undefined;
	    this.bgColor = options && options.bgColor ? options.bgColor : this.options.bgColor;
	    this.fontColor = options && options.fontColor ? options.fontColor : this.options.fontColor;
	    this.title = options && options.title ? options.title : this.options.title;
	    this.info = options && options.info ? options.info : undefined;
	    this.buttons = options && options.buttons ? options.buttons : this.options.buttons;
	    this.init();
	    this.isShowing = false;
	}
	/**
	 * 默认选项
	 * @type {{width: number,fontColor: string,title: string,info:string,buttons:array}}
	 */
	Dialog.prototype.options = {
	    width: 610,
	    bgColor: "rgba(66, 120, 206,0.4)",
	    fontColor: "#FFFFFF",
	    title: "我是标题",
	    info: "我是详细说明",
	    buttons: ["第一个button", "第二个button", "第三个button"]
	};

	/**
	 * 初始化
	 */
	Dialog.prototype.init = function () {
	    var diff = 0;
	    var baseStyle = "width:100%;height:80px;line-height:80px;text-align:center;";
	    var titleMarginBottom = 20;
	    var buttonMarginTop = 40;

	    this.dialog = document.createElement('div');
	    this.diabg = document.createElement('div');
	    this.diaButton = document.createElement('div');
	    this.diaTitle = document.createElement('div');
	    this.diaTitle.innerHTML = this.title;

	    if (this.info) {
	        this.diaInfo = document.createElement('div');
	        this.diaInfo.innerHTML = this.info;
	        diff = 80;
	        this.diaInfo.setAttribute("style", baseStyle + "margin-top:" + titleMarginBottom + "px");
	    }

	    if (!this.h) {
	        this.h = 81 * (this.buttons.length + 1) - 2 + diff + titleMarginBottom + buttonMarginTop + 10;
	    }

	    this.dialog.setAttribute("style", "position:absolute;width:" + this.w + "px; height:" + this.h + "px;top:50%;left:50%;margin-left:-" + this.w / 2 + "px;margin-top:-" + this.h / 2 + "px;z-index:1000;overflow:hidden;font-size:30px;color:" + this.fontColor);
	    this.dialog.setAttribute("fe-role", "Switch");
	    this.diabg.setAttribute("style", "text-align:center;opacity:0.9;background-color:#000000; position:absolute; z-index:999; width:100%; height:100%; top:0; left:0;");
	    this.diaButton.setAttribute("style", "width:95%;height:80px;line-height:80px;text-align:center;background-color:" + this.bgColor + ";border: 5px solid transparent");
	    this.diaButton.setAttribute("fe-role", "Widget");
	    this.diaButton.className = "diaButton";
	    this.diaTitle.setAttribute("style", baseStyle);
	    this.dialog.appendChild(this.diaTitle);
	    if (this.info) {
	        this.dialog.appendChild(this.diaInfo);
	    }
	    for (var index in this.buttons) {
	        var tempButton = this.diaButton.cloneNode(true);
	        tempButton.innerHTML = this.buttons[index];
	        tempButton.id = "diaButton" + index;
	        if (index == 0) {
	            tempButton.style.marginTop = buttonMarginTop + "px";
	        } else {
	            var line = document.createElement('div');
	            line.setAttribute("style", "width:95%;height:1px;background-color:rgba(255,255,255,0.8)");
	            this.dialog.appendChild(line);
	        }
	        this.dialog.appendChild(tempButton);
	    }
	    this.registerCss();
	};

	/**
	 * 获取dialog本身（不包括外层的bgGround）
	 * @returns {HTMLElement|*}
	 */
	Dialog.prototype.getBody = function () {
	    return this.dialog;
	};

	Dialog.prototype.show = function () {
	    console.log("Dialog show");
	    document.body.appendChild(this.diabg);
	    document.body.appendChild(this.dialog);
	    this.isShowing = true;
	    this.lastFocusWidget = FocusEngine.getFocusedLeaf();
	    this.dialogSwitch = FocusEngine.render(this.dialog);
	    this.dialogSwitch.focus();
	    this.listenIndex = this.dialogSwitch.on('keydown', (function (e) {
	        e.stopPropagation();
	        if (this.callBack && !this.isUpListener && e.keyCode == 13) {
	            var focusid = e.target.id;
	            if (this.isDefalt) {
	                focusid = focusid.substring(9);
	            }
	            console.log("focusid == " + focusid);
	            this.callBack(focusid);
	        }
	    }).bind(this));

	    this.listenIndex2 = this.dialogSwitch.on('keyup', (function (e) {
	        e.stopPropagation();
	        if (this.callBack && this.isUpListener && e.keyCode == 13) {
	            var focusid = e.target.id;
	            if (this.isDefalt) {
	                focusid = focusid.substring(9);
	            }
	            console.log("focusid == " + focusid);
	            this.callBack(focusid);
	            e.stopPropagation();
	        } else if (e.keyCode == 27) {
	            if (this.onBackListener) {
	                this.onBackListener();
	            } else {
	                this.hide();
	            }
	        }
	    }).bind(this));

	    this.listenIndex3 = this.dialogSwitch.on('ok', function (e) {
	        e.preventDefault();
	        e.stopPropagation();
	    });
	};

	Dialog.prototype.hide = function () {
	    console.log("Dialog hide");
	    this.dialogSwitch.off(this.listenIndex);
	    this.dialogSwitch.off(this.listenIndex2);
	    this.dialogSwitch.off(this.listenIndex3);
	    this.dialogSwitch.disable();
	    this.lastFocusWidget && this.lastFocusWidget.focus();
	    document.body.removeChild(this.dialog);
	    document.body.removeChild(this.diabg);

	    this.isShowing = false;
	};

	Dialog.prototype.isShow = function () {
	    return this.isShowing;
	};

	Dialog.prototype.destroy = function () {};

	/**
	 * 动态加载CSS样式文本
	 * @param {string} cssText,css样式文本块
	 * @return void
	 */
	Dialog.prototype.registerCss = function () {
	    var style = document.createElement("style");
	    var head = document.getElementsByTagName("head")[0];
	    if (!head) {
	        return;
	    };
	    var cssText = ".diaButton.fe-focus {background-color: #0099ff !important; border: 5px solid #ffffff !important}";
	    if (document.all) {
	        style.setAttribute("type", "text/css");
	        style.styleSheet.cssText = cssText;
	    } else {
	        style.appendChild(document.createTextNode(cssText));
	    };
	    if (head.firstChild) {
	        head.insertBefore(style, head.firstChild);
	    } else {
	        head.appendChild(style);
	    };
	};

	/**
	 * 传入点击回到事件。cb的入参是button的focusId;
	 * 默认的id是index，比如第一个button为0
	 * @param cb
	 */
	Dialog.prototype.setOnClickListener = function (cb) {
	    this.callBack = cb;
	};

	Dialog.prototype.setOnBackListener = function (cb) {
	    this.onBackListener = cb;
	};

	/**
	 * 更新dialog里面的内容，将innerHtml插入
	 * @param innerHtml
	 */
	Dialog.prototype.updateDialog = function (innerHtml) {
	    this.isDefalt = false;
	    this.dialog.innerHTML = innerHtml;
	};

	exports["default"] = Dialog;
	module.exports = exports["default"];

/***/ }
/******/ ]);